import {getHerbFlavorList, getHerbPropertyList, getHerbmeridiansList } from '@/service/tcm'
import { controlStore } from '@/stores/control'
const controlSto = controlStore();


export const toGetHerbFlavorList = () => {
  let params = {
      langCode: controlSto.language == 1 ? 'ENG' : 'CHN',
  };
  let flavorList = []
getHerbFlavorList(params).then((res) => {
      if (res.success) {
        flavorList = res.data || [];
      }
  }).catch(() => {});
  return flavorList;
};

const toGetHerbPropertyList = () => {
  let params = {
      langCode: controlSto.language == 1 ? 'ENG' : 'CHN',
  };
  let proptyList = []
getHerbPropertyList(params).then((res) => {
      if (res.success) {
        proptyList = res.data || [];
      }
      return proptyList;
  }).catch(() => {});
};
const toGetHerbMeridiansList = () => {
  let params = {
      langCode: controlSto.language == 1 ? 'ENG' : 'CHN',
  };
  let meridiansList = []
  getHerbmeridiansList(params).then((res) => {
      if (res.success) {
        meridiansList = res.data || [];
      }
      return meridiansList;
  }).catch(() => {});
};